package com.baizhi.springboot.entity;

import java.util.List;

public class Resource {
    /*`resource_id` int(11) NOT NULL auto_increment,
  `resource_name` varchar(50) default NULL,
  `resource_url` varchar(500) default NULL,
  `resource_type` varchar(50) default NULL,
  `resource_permission` varchar(50) default NULL,
  `resource_parent_id` int(11) default NULL,*/
    private Integer id;
    private String name;
    private String url;
    private String type;
    private String permission;
    private Integer parent_id;
    private List<Resource> secondResource;

    public List<Resource> getSecondResource() {
        return secondResource;
    }

    public void setSecondResource(List<Resource> secondResource) {
        this.secondResource = secondResource;
    }

    public Resource(Integer id, String name, String url, String type, String permission, Integer parent_id, List<Resource> secondResource) {
        this.id = id;
        this.name = name;
        this.url = url;
        this.type = type;
        this.permission = permission;
        this.parent_id = parent_id;
        this.secondResource = secondResource;
    }

    @Override
    public String toString() {
        return "Resource{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", type='" + type + '\'' +
                ", permission='" + permission + '\'' +
                ", parent_id=" + parent_id +
                ", secondResource=" + secondResource +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public Integer getParent_id() {
        return parent_id;
    }

    public void setParent_id(Integer parent_id) {
        this.parent_id = parent_id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Resource() {
    }

    public Resource(Integer id, String name, String url, String type, String permission, Integer parent_id) {
        this.id = id;
        this.name = name;
        this.url = url;
        this.type = type;
        this.permission = permission;
        this.parent_id = parent_id;
    }
}
